import { defHttp } from "@/utils/http";

// ERP 招标质量 VO
export interface BidQltyVO {
	id: number; // 主键
	parentId: number; // 父级ID,示例值(32427)
	name: string; // 名称,示例值(张三)
	sqNumb: number; // 顺序
}

// ERP 招标质量 API
export const BidQltyApi = {
	// 查询招标质量分页
	getBidQltyPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/bidding-quality/page`, params });
	},

	// 查询招标质量详情
	getBidQlty: async (id: number) => {
		return await defHttp.get({ url: `/whs/bidding-quality/get?id=` + id });
	},

	// 新增招标质量
	createBidQlty: async (data: BidQltyVO) => {
		return await defHttp.post({ url: `/whs/bidding-quality/create`, data });
	},

	// 修改招标质量
	updateBidQlty: async (data: BidQltyVO) => {
		return await defHttp.put({ url: `/whs/bidding-quality/update`, data });
	},

	// 删除招标质量
	deleteBidQlty: async (id: number) => {
		return await defHttp.delete({
			url: `/whs/bidding-quality/delete?id=` + id
		});
	},

	// 导出招标质量 Excel
	exportBidQlty: async (params: any) => {
		return await defHttp.download({ url: `/whs/bidding-quality/export-excel`, params });
	}
};
